home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / Mesa-3.0 / SRC / S3 / S3mesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-12  |  2.3 KB  |  101 lines

  1. /*
  2.  * Mesa 3-D graphics library
  3.  * Version:  2.3
  4.  * Copyright (C) 1995-1997  Brian Paul
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the Free
  18.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21.  
  22.  
  23. /*
  24.  * S3MESA - S3 Virge driver for Mesa.
  25.  */
  26.  
  27.  
  28. #ifndef S3MESA_H
  29. #define S3MESA_H
  30.  
  31.  
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #include "s3dtk.h"
  38.  
  39.  
  40. #define S3MESA_MAJOR_VERSION 2
  41. #define S3MESA_MINOR_VERSION 3
  42.  
  43.  
  44. /*
  45.  * 1 makes it use the DirectDraw fullscreen
  46.  */
  47. #define USE_FULLSCREEN 0
  48.  
  49.  
  50. /*
  51.  * Values for attribList parameter to s3MesaCreateContext():
  52.  */
  53. #define S3MESA_NONE        0    /* to terminate attribList */
  54. #define S3MESA_DOUBLEBUFFER    10
  55. #define S3MESA_ALPHA_SIZE    11      /* followed by an integer */
  56. #define S3MESA_DEPTH_SIZE    12      /* followed by an integer */
  57. #define S3MESA_STENCIL_SIZE    13      /* followed by an integer */
  58. #define S3MESA_ACCUM_SIZE    14      /* followed by an integer */
  59.  
  60.  
  61.  
  62. typedef unsigned long dword;
  63. typedef unsigned short word;
  64. typedef unsigned char byte;
  65.  
  66.  
  67. typedef struct s3_mesa_context *s3MesaContext;
  68.  
  69.  
  70. s3MesaContext s3MesaCreateContext(  GLuint win,
  71.                                     int width, int height,
  72.                                     const GLint attribList[]);
  73.  
  74. s3MesaContext s3MesaCreateBestContext(  GLuint win,
  75.                                         GLint width, GLint height,
  76.                                         const GLint attribList[]);
  77.  
  78. void s3MesaDestroyContext(s3MesaContext s3ctx);
  79.  
  80. void s3MesaMakeCurrent(s3MesaContext s3ctx);
  81.  
  82. s3MesaContext s3MesaGetCurrentContext( void );
  83.  
  84. void s3MesaSwapBuffers(void);
  85.  
  86. void s3MesaSetNearFar(GLfloat nearVal, GLfloat farVal);
  87.  
  88. void s3MesaMoveWindow(s3MesaContext s3ctx, int x, int y);
  89. void s3MesaResizeWindow(s3MesaContext s3ctx, int w, int h);
  90.  
  91.  
  92. extern HWND hWND;
  93.  
  94.  
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98.  
  99.  
  100. #endif
  101.